#!/usr/bin/env python
#!conding:utf-8
"""
author:Johnson
date: 2017/5/24 11:39
version: v1.0
description:

"""
from flask.helpers import flash


def register_check(user):
    if user.get_by_mail():
        flash('Email already registered.')
    if user.get_by_username():
        flash('Username already registered.')
        #raise ValidationError('Username already registered.')
